<?php

/**
 *
 * @package    opensocial
 * @subpackage datarequest
 * @author     Daniel Botelho <botelho.daniel@gmail.com>
 */
abstract class OSFriends
{
  const FRIENDS_CLASS = 'opensocial.DataRequest.Group';
  
  private $var_name;
  /*private $container;
  private $friend;
  protected $pattern;*/

  function __construct(/*$container,$friend,*/$var)
  {
    //$this->container = $container;
    $this->var_name = $var;
    //$this->friend = $friend;
    //$this->pattern = sfConfig::get('app_opensocial_pattern');
  }
  public function getFriendByIdx($idx){ 
    return new OSFriend($this->var_name."[$idx]"); 
  }

  function getVarName(){ return $this->var_name; }
  //function getContainer(){ return $this->container; }

  abstract function getType();
/*
  function startForeachFriends()
  {
    return sprintf($this->pattern[friends][FOREACHFRIENDS_START_PATTERN],$this->getContainer()->getAppendableDataByKey($this->getVarName()),$this->friend->getVarName());
  }

  function endForeachFriends()
  {
    return sprintf($this->pattern[friends][FOREACHFRIENDS_END_PATTERN]);
  }*/
}
